package lazy.sql;

public enum SqlOperator {
	EQUAL,
	LEFT_LIKE,
	LIKE,
	RIGHT_LIKE,
	NOT_EQUAL,
	LESS_THEN,
	LESS_THEN_OR_EQUAL_TO,
	GREATER_THEN,
	GREATER_THEN_OR_EQUAL_TO,
	IS,
	IS_NOT,
	IN;
	
	public String toOperator() {
		String s;
		switch (this) {
			case EQUAL:
				s = "=";
				break;
			case LEFT_LIKE:
				s = " like ";
				break;
			case LIKE:
				s = " like ";
				break;
			case RIGHT_LIKE:
				s = " like ";
				break;
			case NOT_EQUAL:
				s = "!=";
				break;
			case LESS_THEN:
				s = "<";
				break;
			case LESS_THEN_OR_EQUAL_TO:
				s = "<=";
				break;
			case GREATER_THEN:
				s = ">";
				break;
			case GREATER_THEN_OR_EQUAL_TO:
				s = ">=";
				break;
			case IS:
				s = " IS ";
				break;
			case IS_NOT:
				s = " IS NOT ";
				break;
			case IN:
				s = " IN ";
				break;
			default:
				s = "";
				break;
		}
		return s;
	}
}
